package com.yl.users.mapper

import com.baomidou.mybatisplus.core.mapper.BaseMapper
import com.yl.users.entity.CompanyLinkUserDeptRole
import com.yl.users.entity.CompanyRole
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Param

@Mapper
interface CompanyUserRoleMapper : BaseMapper<CompanyLinkUserDeptRole> {

	/**
	 * 查询用户分部角色id
	 */
	fun getUserSubCompanyRoleIds(@Param("userId") userId: Long, @Param("deptId") deptId: Long): List<Long>

	/**
	 * 查询用户分部角色
	 */
	fun getUserSubCompanyRole(@Param("userId") userId: Long, @Param("deptId") deptId: Long): List<CompanyRole>
}